﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PublicMessage>" %>
<%@ Import Namespace="ViewRes" %>

<%
    using (
        Html.BeginRouteForm("Default", new {controller = "PublicMessages", action = "Add"}, FormMethod.Post,
                            new {enctype = "multipart/form-data"}))
    {%>
   
   <%:Html.Hidden("UserId", (ViewData["LoggedUser"] as User).UserId)%>
   
<table>
    <tr>
        <td>
       <%:PublicMessagesStrings.Message %>
        </td>
        <td>
            <%:Html.TextAreaFor(model => model.Message)%>
        </td>
    </tr>
    <tr> 
        <td>
            <%:PublicMessagesStrings.AttachFile %>
        </td>
        <td> 
            <input type="file" id="postFile" name="postFile" content="kuku"/>
        </td>
    </tr>
</table>
<div>
    <input type="submit" value=<%:PublicMessagesStrings.Publish%>>
</div>
<%
    }%>